local kanpo = fk.CreateSkill {
  name = "3s__kanpo",
}

Fk:loadTranslationTable{
  ["3s__kanpo"] = "看破",
  [":3s__kanpo"] = "你可将一张黑色手牌当【无懈可击】使用。",

  ["#kanpo"] = "看破：你可以将一张黑色手牌当【无懈可击】使用",
}

kanpo:addEffect("viewas", {
  anim_type = "control",
  pattern = "nullification|.|club,spade",
  prompt = "#kanpo",
  handly_pile = true,
  filter_pattern = {
    min_num = 1,
    max_num = 1,
    pattern = ".|.|black|^equip",
  },
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local card = Fk:cloneCard("nullification")
    card.skillName = kanpo.name
    card:addSubcard(cards[1])
    return card
  end,
  enabled_at_response = function (self, player, response)
    return not response and #player:getHandlyIds() > 0
  end,
})

return kanpo